home *** CD-ROM | disk | FTP | other *** search
/ Windows 3-Pak - Disc 3 / Infomagic - Windows 3-Pak (Disc 3 of 3).iso / Telnet-Clients / HOSTACCESS.exe / MISC.1 / LOGIN.MCR < prev    next >
Text File  |  1996-01-22  |  1KB  |  47 lines

  1. rem Simple macro to login to a system which requires
  2. rem a login name and a password.
  3. DIM I as integer
  4. I=0
  5. rem
  6. rem Wake up the connection by sending carriage return
  7. send "CR"
  8. loopy:
  9. wait timeout 30
  10. rem
  11. rem When text received fom host, which contains ogin
  12. rem then send the login user name.
  13. case "ogin: "
  14.  I=I+1 
  15.  rem
  16.  rem check to see if three attempts have been made
  17.  if I > 3 then 
  18.     print "three attempts have been made to log on"
  19.     goto final
  20.  endif
  21.  send "'root'CR"
  22.  delay 3
  23. case "word:"
  24.  rem rem send the password when requested by host
  25.  send "'XZY123DDD'CR"
  26.  delay 3
  27. case "(ansi) "
  28.  rem
  29.  rem When the emulation is requested by the system
  30.  rem and the default is going to be ansi, change
  31.  rem the emulation to adds
  32.  send "'adds'CR"
  33.  delay 2
  34. case "# "
  35.  rem
  36.  rem when logged in and the shell prompt is displayed
  37.  rem send the command to startup the application
  38.  send "'termite.demo.sh'CR"
  39.  delay 2
  40. case ">"
  41.  end
  42. end wait
  43. goto loopy
  44. final:
  45. print "at final"
  46. end
  47.